# -*- coding: utf-8 -*-
from logic import Circuit, Multioutput, OrGate, AndGate, XorGate
                
class BitCmpCircuit(Circuit):
    def __init__(self,name):
        Circuit.__init__(self,name)
        
        # Create all input and outputs
        self.inputA = self.addGate(Multioutput())
        self.inputB = self.addGate(Multioutput())
        
        gate1 = OrGate()
        gate2 = AndGate()
        
        self.addGate(gate1)
        self.addGate(gate2)
        
        self.connect(self.inputA, gate1)
        self.connect(self.inputB, gate1)
        
        self.connect(self.inputA, gate2)
        self.connect(self.inputB, gate2)
                
        self.outputMax = gate1
        self.outputMin = gate2
        